# -*- conding:UTF-8 -*-

'''
@ Project: P7_5group_lotk
@ File: channls.py
@ Author: 罗婷
@ Date：2022/6/9 10:16

'''
from flask_restful import fields

# 频道字段
channls_fields = {
    'cid': fields.Integer,
    'cname': fields.String,
    'ctime': fields.DateTime,
    'utime': fields.DateTime,
    'sequence': fields.Integer,
}

# 文章字段
news_fields = {
    'nid': fields.Integer,
    'user_id': fields.Integer,
    'channel_id': fields.Integer,
    'status': fields.Integer,
    'comment_count': fields.Integer,
    'good_count': fields.Integer,
    'title': fields.String,
    'cover': fields.String,
    'content': fields.String,
    'ctime': fields.DateTime,
    'utime': fields.DateTime,
    'is_follow':fields.Boolean,
    'is_like':fields.Boolean,
    'is_collection':fields.Boolean,
}

# 评论字段
comment_fields = {
    'cmid': fields.Integer,
    'user_id': fields.Integer,
    'article_id': fields.Integer,
    'parent_id': fields.Integer,
    'like_count': fields.Integer,
    'reply_count': fields.Integer,
    'status': fields.Integer,
    'content': fields.String,
    'ctime': fields.DateTime,
}

user_fields = {
    'uname': fields.String,
    'profile_photo': fields.String,
}
